public class Singleton {
    //类加载的同时创建对象
    private static Singleton instance =new Singleton();
    private Singleton(){};
    public static Singleton getInstance(){
        return instance;
    }
}
